home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
422mods.zip
/
TAPEBAK.422
< prev
next >
Wrap
Text File
|
1993-03-13
|
4KB
|
95 lines
Tape Backup system as a transfer section
Madman #2 @15402
Wed Mar 10 10:54:31 1993
Have a tape backup, and wish you could use a tape for a transfer section in
WWIV? Yea, I've seen the fancy elaborate mods that are out there, but gimme
a break... This is the first time I have ever written a MOD of my own. I
wanted something REAL simple and basic. So after asking around and still not
finding what I wanted I made my own.
To use this you have to create a transfer section called TAPE RESTORED FILES
and put one file in it called RESTORED.ZIP.
Adjust the path in the batch file to match whatever you called the directory
when you created it. I used a 0 byte file as the number it shows is not going
to be correct anyway. When the user tries to D/L a file that is off line,
this can restore it, copy it to the 'restored directory' for them to download
then delete the original again conserving disk space. There is never more
than one file in the restored directory and everything off on the transfer's
tape is available for download without you being bothered to have to restore
it.
The normal disclaimers all apply here. I can only tell you that this is
working just fine on my system and nothing catastrophic has occurred. The
batch file is written for a Colorodo Memory Systems Jumbo tape backup. If
you have something else, adjust the command line.
NOTE: This MOD will 2NOT0 work under Windows as Colorado Memory systems has
not designed it's software to work in a background window.
NOTE: Thanks to Incognito! (1@15418) for his assistance in developing this.
NOTE: BACKUP YOUR SOURCE! DO IT BEFORE YOU EVEN LOOK AT THIS MOD! I AM NOT
RESPONSIBLE FOR ANYTHING!
Tested with: 4.22
Difficulty : Can you walk and chew gum?
LEGEND: == existing ++ add =+ modify
In XFER.C search for printfileinfo around line 980. Search down about 10
lines and add this code
== sprintf(s,"%s%s",directories[dn].path,u->filename);
== if (!exist(s)) {
== nl();
== pl(get_string(754)); /* FILE NOT THERE in 4.21a */
== nl();
++ printfile("RESTORE.MSG");
++ pl("Would you like to restore this file? (y,N):");
++ if(yn())
++ sprintf(s,"%s %s%s","RESTORE! ",directories[dn].path,stripfn(u->filename));
++ shrink_out(s,2,1,1,1);
== return(-1);
== }
That's it. Simply get the path & filename and call a batch file... so go
recompile.
____________RESTORE!.BAT FILE (goes in main BBS direstory)__________________
@echo off
break off
@rem ------------
@rem ------------ Adjust the COM port in the next line.
@rem ------------
Echo 2Please wait. Restoring %1 for transfer!0 >com2
@rem ------------
@rem ------------ This line works for a SINGLE volume CMS Jumbo tape
@rem ------------
tape restore %1
@rem ------------
@rem ------------ Adjust the PATH in the next line!!!
@rem ------------
copy %1 d:\dloads\t-bu\restored.zip >nul
del %1 >nul
@rem ------------
@rem ------------ Adjust the COM port in the next 2 lines.
@rem ------------
Echo 2File restored! Please go to the Tape Restored directory0 >com2
Echo 2and download the file as RESTORED.ZIP0 >com2
:EXIT
____________RESTORE.MSG FILE (goes in GFILES directory)____________________
This file is off of the hard drive on tape. You can restore this file if you
would like to have a copy. Here's how it works. If you answer "Yes" to this
prompt, the board will restore the file to the drive and copy it into the
TAPE RESTORED FILES directory as RESTORED.ZIP.. Then you download
RESTORED.ZIP using any protocol you desire.
Remember, if you've downloaded an ARJ file, it's still ARJ... I just had to
copy to a filename so I went with ZIP. Maybe this can be corrected in the
next version of this mod. <not!>